#!/bin/sh
#set timeout 50

test -f /etc/lsb-release
if [ $? -eq 0 ];then
    iNum=$(dpkg --list | grep expect | wc -l)
    if [ $iNum -eq 0 ];then
        sudo apt update
        sudo apt -y install expect
    fi
fi

test -f /etc/redhat-release
if [ $? -eq 0 ];then
    iNum=$(rpm -qa | grep expect | wc -l)
    if [ $iNum -eq 0 ];then
        sudo yum repolist
        sudo yum -y install expect
    fi
fi
